package cn.kow.kmall.common.enums;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: lijun
 * @Description:
 * @Date: Created in 2020-03-05 9:41
 * @Modified By:
 */
public enum UserGenderEnum {

    UNKOWN(0, "保密"),
    MEN(1,"男"),
    WOMEN(2,"女"),
    XMEN(3,"未知"),
    ;

    private Integer value;

    private String name;

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    UserGenderEnum(Integer value, String name) {
        this.value = value;
        this.name = name;
    }

    public static Map<Integer, String> getMap() {
        Map<Integer, String> map = new HashMap<>();
        for (UserGenderEnum entry : UserGenderEnum.values()) {
            map.put(entry.getValue(), entry.getName());
        }
        return map;
    }
}
